<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .father {
            width: 300px;
            height: 300px;
            background-color: pink;
            /*解决办法: 如果没有需要设置border，不建议使用*/
            /*padding-top: 50px;*/
            /*overflow: hidden;*/
        }

        .son {
            width: 100px;
            height: 100px;
            background-color: skyblue;
            /*外边距塌陷问题*/
            margin-top: 50px;
            /*display: inline-block;*/
        }
    </style>
</head>
<body>
<div class="father">
    <div class="son">son</div>
</div>
</body>
</html>